home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / !Interfaces / Universal Interfaces 2.0a1 / CIncludes / PPCToolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-17  |  16.4 KB  |  520 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        PPCToolbox.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.  Sunday, July 17, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __PPCTOOLBOX__
  18. #define __PPCTOOLBOX__
  19.  
  20.  
  21. #ifndef __APPLETALK__
  22. #include <AppleTalk.h>
  23. #endif
  24. /*    #include <Types.h>                                            */
  25. /*        #include <ConditionalMacros.h>                            */
  26. /*    #include <OSUtils.h>                                        */
  27. /*        #include <MixedMode.h>                                    */
  28.  
  29. #ifndef __MEMORY__
  30. #include <Memory.h>
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if GENERATINGPOWERPC
  38. #pragma options align=mac68k
  39. #endif
  40.  
  41. #ifdef __CFM68K__
  42. #pragma lib_export on
  43. #endif
  44.  
  45. typedef unsigned char PPCServiceType;
  46.  
  47.  
  48. enum {
  49.     ppcServiceRealTime            = 1
  50. };
  51.  
  52. typedef short PPCLocationKind;
  53.  
  54.  
  55. enum {
  56.     ppcNoLocation                = 0,                            /* There is no PPCLocName */
  57.     ppcNBPLocation                = 1,                            /* Use AppleTalk NBP      */
  58.     ppcNBPTypeLocation            = 2                                /* Used for specifying a location name type during PPCOpen only */
  59. };
  60.  
  61. typedef short PPCPortKinds;
  62.  
  63.  
  64. enum {
  65.     ppcByCreatorAndType            = 1,                            /* Port type is specified as colloquial Mac creator and type */
  66.     ppcByString                    = 2                                /* Port type is in pascal string format */
  67. };
  68.  
  69. /* Values returned for request field in PPCInform call */
  70. typedef unsigned char PPCSessionOrigin;
  71.  
  72.  
  73. enum {
  74. /* Values returned for requestType field in PPCInform call */
  75.     ppcLocalOrigin                = 1,                            /* session originated from this machine */
  76.     ppcRemoteOrigin                = 2                                /* session originated from remote machine */
  77. };
  78.  
  79. typedef short PPCPortRefNum;
  80.  
  81. typedef long PPCSessRefNum;
  82.  
  83. struct PPCPortRec {
  84.     ScriptCode                        nameScript;                    /* script of name */
  85.     Str32                            name;                        /* name of port as seen in browser */
  86.     PPCPortKinds                    portKindSelector;            /* which variant */
  87.     union {
  88.         Str32                            portTypeStr;            /* pascal type string */
  89.             struct {
  90.                 OSType                            portCreator;
  91.                 OSType                            portType;
  92.             }                            port;
  93.     } u;
  94. };
  95.  
  96. typedef struct PPCPortRec PPCPortRec, *PPCPortPtr;
  97.  
  98. struct LocationNameRec {
  99.     PPCLocationKind                    locationKindSelector;        /* which variant */
  100.     union {
  101.         EntityName                        nbpEntity;                /* NBP name entity */
  102.         Str32                            nbpType;                /* just the NBP type string, for PPCOpen */
  103.     } u;
  104. };
  105.  
  106. typedef struct LocationNameRec LocationNameRec, *LocationNamePtr;
  107.  
  108. struct PortInfoRec {
  109.     unsigned char                    filler1;
  110.     Boolean                            authRequired;
  111.     PPCPortRec                        name;
  112. };
  113. typedef struct PortInfoRec PortInfoRec, *PortInfoPtr;
  114.  
  115. typedef PortInfoRec *PortInfoArrayPtr;
  116.  
  117. typedef union PPCParamBlockRec PPCParamBlockRec, *PPCParamBlockPtr;
  118.  
  119. typedef pascal void (*PPCCompProcPtr)(PPCParamBlockPtr pb);
  120.  
  121. #if GENERATINGCFM
  122. typedef UniversalProcPtr PPCCompUPP;
  123. #else
  124. typedef PPCCompProcPtr PPCCompUPP;
  125. #endif
  126.  
  127. #define PPCHeader                 \
  128.     Ptr qLink;                     \
  129.     unsigned short csCode;         \
  130.     unsigned short intUse;         \
  131.     Ptr intUsePtr;                 \
  132.                                 \
  133.     PPCCompUPP ioCompletion;        \
  134.                                 \
  135.     OSErr ioResult;             \
  136.     unsigned long    Reserved[5];
  137. struct PPCOpenPBRec {
  138.     Ptr                                qLink;
  139.     unsigned short                    csCode;
  140.     unsigned short                    intUse;
  141.     Ptr                                intUsePtr;
  142.     PPCCompUPP                        ioCompletion;
  143.     OSErr                            ioResult;
  144.     unsigned long                    Reserved[5];
  145.     PPCPortRefNum                    portRefNum;                    /* 38 <--   Port Reference */
  146.     long                            filler1;
  147.     PPCServiceType                    serviceType;                /* 44 -->    Bit field describing the requested port service */
  148.     UInt8                            resFlag;                    /* Must be set to 0 */
  149.     PPCPortPtr                        portName;                    /* 46 -->   PortName for PPC */
  150.     LocationNamePtr                    locationName;                /* 50 -->   If NBP Registration is required */
  151.     Boolean                            networkVisible;                /* 54 -->   make this network visible on network */
  152.     Boolean                            nbpRegistered;                /* 55 <--   The given location name was registered on the network */
  153. };
  154. typedef struct PPCOpenPBRec PPCOpenPBRec, *PPCOpenPBPtr;
  155.  
  156. struct PPCInformPBRec {
  157.     Ptr                                qLink;
  158.     unsigned short                    csCode;
  159.     unsigned short                    intUse;
  160.     Ptr                                intUsePtr;
  161.     PPCCompUPP                        ioCompletion;
  162.     OSErr                            ioResult;
  163.     unsigned long                    Reserved[5];
  164.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  165.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  166.     PPCServiceType                    serviceType;                /* 44 <--   Status Flags for type of session, local, remote */
  167.     Boolean                            autoAccept;                    /* 45 -->   if true session will be accepted automatically */
  168.     PPCPortPtr                        portName;                    /* 46 -->   Buffer for Source PPCPortRec */
  169.     LocationNamePtr                    locationName;                /* 50 -->   Buffer for Source LocationNameRec */
  170.     StringPtr                        userName;                    /* 54 -->   Buffer for Soure user's name trying to link. */
  171.     unsigned long                    userData;                    /* 58 <--   value included in PPCStart's userData */
  172.     PPCSessionOrigin                requestType;                /* 62 <--   Local or Network */
  173.     SInt8                            filler;
  174. };
  175. typedef struct PPCInformPBRec PPCInformPBRec, *PPCInformPBPtr;
  176.  
  177. struct PPCStartPBRec {
  178.     Ptr                                qLink;
  179.     unsigned short                    csCode;
  180.     unsigned short                    intUse;
  181.     Ptr                                intUsePtr;
  182.     PPCCompUPP                        ioCompletion;
  183.     OSErr                            ioResult;
  184.     unsigned long                    Reserved[5];
  185.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  186.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  187.     PPCServiceType                    serviceType;                /* 44 <--   Actual service method (realTime) */
  188.     UInt8                            resFlag;                    /* 45 -->   Must be set to 0  */
  189.     PPCPortPtr                        portName;                    /* 46 -->   Destination portName */
  190.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS style service location name */
  191.     unsigned long                    rejectInfo;                    /* 54 <--   reason for rejecting the session request */
  192.     unsigned long                    userData;                    /* 58 -->   Copied to destination PPCInform parameter block */
  193.     unsigned long                    userRefNum;                    /* 62 -->   userRefNum (obtained during login process)  */
  194. };
  195. typedef struct PPCStartPBRec PPCStartPBRec, *PPCStartPBPtr;
  196.  
  197. struct PPCAcceptPBRec {
  198.     Ptr                                qLink;
  199.     unsigned short                    csCode;
  200.     unsigned short                    intUse;
  201.     Ptr                                intUsePtr;
  202.     PPCCompUPP                        ioCompletion;
  203.     OSErr                            ioResult;
  204.     unsigned long                    Reserved[5];
  205.     short                            filler1;
  206.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  207. };
  208. typedef struct PPCAcceptPBRec PPCAcceptPBRec, *PPCAcceptPBPtr;
  209.  
  210. struct PPCRejectPBRec {
  211.     Ptr                                qLink;
  212.     unsigned short                    csCode;
  213.     unsigned short                    intUse;
  214.     Ptr                                intUsePtr;
  215.     PPCCompUPP                        ioCompletion;
  216.     OSErr                            ioResult;
  217.     unsigned long                    Reserved[5];
  218.     short                            filler1;
  219.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  220.     short                            filler2;
  221.     long                            filler3;
  222.     long                            filler4;
  223.     unsigned long                    rejectInfo;                    /* 54 -->   reason for rejecting the session request  */
  224. };
  225. typedef struct PPCRejectPBRec PPCRejectPBRec, *PPCRejectPBPtr;
  226.  
  227. struct PPCWritePBRec {
  228.     Ptr                                qLink;
  229.     unsigned short                    csCode;
  230.     unsigned short                    intUse;
  231.     Ptr                                intUsePtr;
  232.     PPCCompUPP                        ioCompletion;
  233.     OSErr                            ioResult;
  234.     unsigned long                    Reserved[5];
  235.     short                            filler1;
  236.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  237.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  238.     Size                            actualLength;                /* 48 <--   Actual Length Written */
  239.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  240.     Boolean                            more;                        /* 56 -->   if more data in this block will be written */
  241.     unsigned char                    filler2;
  242.     unsigned long                    userData;                    /* 58 -->   Message block userData Uninterpreted by PPC */
  243.     OSType                            blockCreator;                /* 62 -->   Message block creator Uninterpreted by PPC */
  244.     OSType                            blockType;                    /* 66 -->   Message block type Uninterpreted by PPC */
  245. };
  246. typedef struct PPCWritePBRec PPCWritePBRec, *PPCWritePBPtr;
  247.  
  248. struct PPCReadPBRec {
  249.     Ptr                                qLink;
  250.     unsigned short                    csCode;
  251.     unsigned short                    intUse;
  252.     Ptr                                intUsePtr;
  253.     PPCCompUPP                        ioCompletion;
  254.     OSErr                            ioResult;
  255.     unsigned long                    Reserved[5];
  256.     short                            filler1;
  257.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  258.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  259.     Size                            actualLength;                /* 48 <--   Actual length read */
  260.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  261.     Boolean                            more;                        /* 56 <--   if true more data in this block to be read */
  262.     unsigned char                    filler2;
  263.     unsigned long                    userData;                    /* 58 <--   Message block userData Uninterpreted by PPC */
  264.     OSType                            blockCreator;                /* 62 <--   Message block creator Uninterpreted by PPC */
  265.     OSType                            blockType;                    /* 66 <--   Message block type Uninterpreted by PPC */
  266. };
  267. typedef struct PPCReadPBRec PPCReadPBRec, *PPCReadPBPtr;
  268.  
  269. struct PPCEndPBRec {
  270.     Ptr                                qLink;
  271.     unsigned short                    csCode;
  272.     unsigned short                    intUse;
  273.     Ptr                                intUsePtr;
  274.     PPCCompUPP                        ioCompletion;
  275.     OSErr                            ioResult;
  276.     unsigned long                    Reserved[5];
  277.     short                            filler1;
  278.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  279. };
  280. typedef struct PPCEndPBRec PPCEndPBRec, *PPCEndPBPtr;
  281.  
  282. struct PPCClosePBRec {
  283.     Ptr                                qLink;
  284.     unsigned short                    csCode;
  285.     unsigned short                    intUse;
  286.     Ptr                                intUsePtr;
  287.     PPCCompUPP                        ioCompletion;
  288.     OSErr                            ioResult;
  289.     unsigned long                    Reserved[5];
  290.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  291. };
  292. typedef struct PPCClosePBRec PPCClosePBRec, *PPCClosePBPtr;
  293.  
  294. struct IPCListPortsPBRec {
  295.     Ptr                                qLink;
  296.     unsigned short                    csCode;
  297.     unsigned short                    intUse;
  298.     Ptr                                intUsePtr;
  299.     PPCCompUPP                        ioCompletion;
  300.     OSErr                            ioResult;
  301.     unsigned long                    Reserved[5];
  302.     short                            filler1;
  303.     unsigned short                    startIndex;                    /* 40 -->   Start Index */
  304.     unsigned short                    requestCount;                /* 42 -->   Number of entries to be returned */
  305.     unsigned short                    actualCount;                /* 44 <--   Actual Number of entries to be returned */
  306.     PPCPortPtr                        portName;                    /* 46 -->   PortName Match */
  307.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS type name to locate the Port Location */
  308.     PortInfoArrayPtr                bufferPtr;                    /* 54 -->   Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
  309. };
  310. typedef struct IPCListPortsPBRec IPCListPortsPBRec, *IPCListPortsPBPtr;
  311.  
  312. union PPCParamBlockRec {
  313.     PPCOpenPBRec                    openParam;
  314.     PPCInformPBRec                    informParam;
  315.     PPCStartPBRec                    startParam;
  316.     PPCAcceptPBRec                    acceptParam;
  317.     PPCRejectPBRec                    rejectParam;
  318.     PPCWritePBRec                    writeParam;
  319.     PPCReadPBRec                    readParam;
  320.     PPCEndPBRec                        endParam;
  321.     PPCClosePBRec                    closeParam;
  322.     IPCListPortsPBRec                listPortsParam;
  323. };
  324.  
  325. #if !GENERATINGCFM
  326. #pragma parameter __D0 PPCInit
  327. #endif
  328. extern pascal OSErr PPCInit(void)
  329.  TWOWORDINLINE(0x7000, 0xA0DD);
  330. #define PPCOpen(pb, async) ((async) ? PPCOpenAsync(pb) : PPCOpenSync(pb))
  331.  
  332. #if !GENERATINGCFM
  333. #pragma parameter __D0 PPCOpenSync(__A0)
  334. #endif
  335. extern pascal OSErr PPCOpenSync(PPCOpenPBPtr pb)
  336.  TWOWORDINLINE(0x7001, 0xA0DD);
  337.  
  338. #if !GENERATINGCFM
  339. #pragma parameter __D0 PPCOpenAsync(__A0)
  340. #endif
  341. extern pascal OSErr PPCOpenAsync(PPCOpenPBPtr pb)
  342.  TWOWORDINLINE(0x7001, 0xA4DD);
  343. #define PPCInform(pb, async) ((async) ? PPCInformAsync(pb) : PPCInformSync(pb))
  344.  
  345. #if !GENERATINGCFM
  346. #pragma parameter __D0 PPCInformSync(__A0)
  347. #endif
  348. extern pascal OSErr PPCInformSync(PPCInformPBPtr pb)
  349.  TWOWORDINLINE(0x7003, 0xA0DD);
  350.  
  351. #if !GENERATINGCFM
  352. #pragma parameter __D0 PPCInformAsync(__A0)
  353. #endif
  354. extern pascal OSErr PPCInformAsync(PPCInformPBPtr pb)
  355.  TWOWORDINLINE(0x7003, 0xA4DD);
  356. #define PPCStart(pb, async) ((async) ? PPCStartAsync(pb) : PPCStartSync(pb))
  357.  
  358. #if !GENERATINGCFM
  359. #pragma parameter __D0 PPCStartSync(__A0)
  360. #endif
  361. extern pascal OSErr PPCStartSync(PPCStartPBPtr pb)
  362.  TWOWORDINLINE(0x7002, 0xA0DD);
  363.  
  364. #if !GENERATINGCFM
  365. #pragma parameter __D0 PPCStartAsync(__A0)
  366. #endif
  367. extern pascal OSErr PPCStartAsync(PPCStartPBPtr pb)
  368.  TWOWORDINLINE(0x7002, 0xA4DD);
  369. #define PPCAccept(pb, async) ((async) ? PPCAcceptAsync(pb) : PPCAcceptSync(pb))
  370.  
  371. #if !GENERATINGCFM
  372. #pragma parameter __D0 PPCAcceptSync(__A0)
  373. #endif
  374. extern pascal OSErr PPCAcceptSync(PPCAcceptPBPtr pb)
  375.  TWOWORDINLINE(0x7004, 0xA0DD);
  376.  
  377. #if !GENERATINGCFM
  378. #pragma parameter __D0 PPCAcceptAsync(__A0)
  379. #endif
  380. extern pascal OSErr PPCAcceptAsync(PPCAcceptPBPtr pb)
  381.  TWOWORDINLINE(0x7004, 0xA4DD);
  382. #define PPCReject(pb, async) ((async) ? PPCRejectAsync(pb) : PPCRejectSync(pb))
  383.  
  384. #if !GENERATINGCFM
  385. #pragma parameter __D0 PPCRejectSync(__A0)
  386. #endif
  387. extern pascal OSErr PPCRejectSync(PPCRejectPBPtr pb)
  388.  TWOWORDINLINE(0x7005, 0xA0DD);
  389.  
  390. #if !GENERATINGCFM
  391. #pragma parameter __D0 PPCRejectAsync(__A0)
  392. #endif
  393. extern pascal OSErr PPCRejectAsync(PPCRejectPBPtr pb)
  394.  TWOWORDINLINE(0x7005, 0xA4DD);
  395. #define PPCWrite(pb, async) ((async) ? PPCWriteAsync(pb) : PPCWriteSync(pb))
  396.  
  397. #if !GENERATINGCFM
  398. #pragma parameter __D0 PPCWriteSync(__A0)
  399. #endif
  400. extern pascal OSErr PPCWriteSync(PPCWritePBPtr pb)
  401.  TWOWORDINLINE(0x7006, 0xA0DD);
  402.  
  403. #if !GENERATINGCFM
  404. #pragma parameter __D0 PPCWriteAsync(__A0)
  405. #endif
  406. extern pascal OSErr PPCWriteAsync(PPCWritePBPtr pb)
  407.  TWOWORDINLINE(0x7006, 0xA4DD);
  408. #define PPCRead(pb, async) ((async) ? PPCReadAsync(pb) : PPCReadSync(pb))
  409.  
  410. #if !GENERATINGCFM
  411. #pragma parameter __D0 PPCReadSync(__A0)
  412. #endif
  413. extern pascal OSErr PPCReadSync(PPCReadPBPtr pb)
  414.  TWOWORDINLINE(0x7007, 0xA0DD);
  415.  
  416. #if !GENERATINGCFM
  417. #pragma parameter __D0 PPCReadAsync(__A0)
  418. #endif
  419. extern pascal OSErr PPCReadAsync(PPCReadPBPtr pb)
  420.  TWOWORDINLINE(0x7007, 0xA4DD);
  421. #define PPCEnd(pb, async) ((async) ? PPCEndAsync(pb) : PPCEndSync(pb))
  422.  
  423. #if !GENERATINGCFM
  424. #pragma parameter __D0 PPCEndSync(__A0)
  425. #endif
  426. extern pascal OSErr PPCEndSync(PPCEndPBPtr pb)
  427.  TWOWORDINLINE(0x7008, 0xA0DD);
  428.  
  429. #if !GENERATINGCFM
  430. #pragma parameter __D0 PPCEndAsync(__A0)
  431. #endif
  432. extern pascal OSErr PPCEndAsync(PPCEndPBPtr pb)
  433.  TWOWORDINLINE(0x7008, 0xA4DD);
  434. #define PPCClose(pb, async) ((async) ? PPCCloseAsync(pb) : PPCCloseSync(pb))
  435.  
  436. #if !GENERATINGCFM
  437. #pragma parameter __D0 PPCCloseSync(__A0)
  438. #endif
  439. extern pascal OSErr PPCCloseSync(PPCClosePBPtr pb)
  440.  TWOWORDINLINE(0x7009, 0xA0DD);
  441.  
  442. #if !GENERATINGCFM
  443. #pragma parameter __D0 PPCCloseAsync(__A0)
  444. #endif
  445. extern pascal OSErr PPCCloseAsync(PPCClosePBPtr pb)
  446.  TWOWORDINLINE(0x7009, 0xA4DD);
  447. #define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
  448.  
  449. #if !GENERATINGCFM
  450. #pragma parameter __D0 IPCListPortsSync(__A0)
  451. #endif
  452. extern pascal OSErr IPCListPortsSync(IPCListPortsPBPtr pb)
  453.  TWOWORDINLINE(0x700A, 0xA0DD);
  454.  
  455. #if !GENERATINGCFM
  456. #pragma parameter __D0 IPCListPortsAsync(__A0)
  457. #endif
  458. extern pascal OSErr IPCListPortsAsync(IPCListPortsPBPtr pb)
  459.  TWOWORDINLINE(0x700A, 0xA4DD);
  460. extern pascal OSErr DeleteUserIdentity(unsigned long userRef);
  461. extern pascal OSErr GetDefaultUser(unsigned long *userRef, Str32 userName);
  462. extern pascal OSErr StartSecureSession(PPCStartPBPtr pb, Str32 userName, Boolean useDefault, Boolean allowGuest, Boolean *guestSelected, ConstStr255Param prompt);
  463. typedef pascal Boolean (*PPCFilterProcPtr)(LocationNamePtr name, PortInfoPtr port);
  464.  
  465. #if GENERATINGCFM
  466. typedef UniversalProcPtr PPCFilterUPP;
  467. #else
  468. typedef PPCFilterProcPtr PPCFilterUPP;
  469. #endif
  470.  
  471. enum {
  472.     uppPPCCompProcInfo = kPascalStackBased
  473.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PPCParamBlockPtr))),
  474.     uppPPCFilterProcInfo = kPascalStackBased
  475.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  476.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(LocationNamePtr)))
  477.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(PortInfoPtr)))
  478. };
  479.  
  480. #if GENERATINGCFM
  481. #define NewPPCCompProc(userRoutine)        \
  482.         (PPCCompUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
  483. #define NewPPCFilterProc(userRoutine)        \
  484.         (PPCFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
  485. #else
  486. #define NewPPCCompProc(userRoutine)        \
  487.         ((PPCCompUPP) (userRoutine))
  488. #define NewPPCFilterProc(userRoutine)        \
  489.         ((PPCFilterUPP) (userRoutine))
  490. #endif
  491.  
  492. #if GENERATINGCFM
  493. #define CallPPCCompProc(userRoutine, pb)        \
  494.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCCompProcInfo, (pb))
  495. #define CallPPCFilterProc(userRoutine, name, port)        \
  496.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCFilterProcInfo, (name), (port))
  497. #else
  498. #define CallPPCCompProc(userRoutine, pb)        \
  499.         (*(userRoutine))((pb))
  500. #define CallPPCFilterProc(userRoutine, name, port)        \
  501.         (*(userRoutine))((name), (port))
  502. #endif
  503.  
  504. extern pascal OSErr PPCBrowser(ConstStr255Param prompt, ConstStr255Param applListLabel, Boolean defaultSpecified, LocationNameRec *theLocation, PortInfoRec *thePortInfo, PPCFilterUPP portFilter, ConstStr32Param theLocNBPType)
  505.  THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
  506.  
  507. #ifdef __CFM68K__
  508. #pragma lib_export off
  509. #endif
  510.  
  511. #if GENERATINGPOWERPC
  512. #pragma options align=reset
  513. #endif
  514.  
  515. #ifdef __cplusplus
  516. }
  517. #endif
  518.  
  519. #endif /* __PPCTOOLBOX__ */
  520.